package com.irdstudio.efp.batch.service.impl.basicfn;

import com.irdstudio.efp.batch.service.facade.basicfn.FailureQuotaLimitStsService;
import com.irdstudio.efp.console.service.facade.CustomerLimitInfoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.time.LocalDate;

/**
 * 需求编号【2019D0509】
 * 失效 额度限制日期到期的信息
 * @author qiuyf
 * @version 0.1 初始为0.1,后续变更则修改
 * @since 2019/12/9 12:18
 */
@Service("failureQuotaLimitStsService")
public class FailureQuotaLimitStsServiceImpl implements FailureQuotaLimitStsService {

    private Logger logger = LoggerFactory.getLogger("FailureQuotaLimitStsServiceImpl");

    @Autowired
    @Qualifier("customerLimitInfoService")
    private CustomerLimitInfoService customerLimitInfoService;

    @Override
    public Boolean inValidQuotaLimitOverEndDt() {
        logger.info("======>失效额度限制日期到期的信息开始，当前日期为:<======" + LocalDate.now());
        int num = customerLimitInfoService.inValidQuotaLimitOverEndDt();
        logger.info("======>失效额度限制日期到期的信息结束，失效的额度限制信息条数为:<======" +num);
        return true;
    }
}
